added attr_accesssible and fixed models