setting up anonymous functions