finish code

now uses parameters arguments and return value