Revert "shortened code using reflection (by james)"

This reverts commit 378817014b53ef3023e0c343e7f6e5f9c6ac8807.