refactored how coercion works to match rails attributes, added attribute protection