trying to fix function argument parsing