refactoring and done assignments