added functions to clerk controller