fix #4

- replaced threading with multiprocessing
- moved handle_timeout to the proper location