refactored functions from simple_server into a helper
created test file for simple_server