Fixing code

Fixed code to meet specifications
Fixes