working on element resize function