added sleep checker(needs testing)