updated pause logic