adding resize callback