upgrading script to allow mass assignment of attributes