made some changes for server to work