moved proces_loop into function, issue #34