performance improvements (dont metaprogram if you dont have to)