use xml metadata rather than annotations
minor code optimize