erase past functionality