Write method to pass shorten test
Fix the shorten method to return true or false