added parameter handling, and return value handling