Implemented rules 1,3
Refactored