before applying to DB