optimize reflection usages