almost ready for testing, added comments, just need to figure out entities