Added grammar for functions