Improved 'callFunction', now checks for correct argument count