making resize real time