refactored more lines