implemented with threading; to-do: handl commands/file server