added at rest detection