added clear space function