implement resize
fix dispose