pretty much everything implemented except for server communication