added condtional class on completed
made the logic a lot simpler