removed extraneous setMetatype function