move resize into shake event function