fixed template and linked to python function