added fun / endfun tokens to enable function declarations