adding clear function