split reflection helper, added license MPL2