added clear function