fixed some things. need to refactor