Refactoring update

refactored everyting