changed before_save to before_create and added some gems