some effort to implement resize, but it is not working yet