Added actual function calling. Fixed argument parsing and result code
Betterd a comment