refactored magic property parsing