Third commit - refactored