Code written need additional tests
Final code to submit to codesculpter