wrote the cls function