added code for functions