added checkresize