added method to update attributes in a model
added tests for model accessors