fixed return expression syntax
changed to embedded control flow if possible
added comments
small fix