calling pug mode functions