trim values before store