maybe fixed some errors, need to start testing