refactored more changes