slightly refactored lines challenge