works in a terminal or if i run it as program. or maybe i am missing something. thanks for your attention.