added the parser for <function> elements