removed sockets and added file reading