removed client loop in main, only works as server now