tried before_save but params are inaccesible in mode