more work towards compiling functions