remove unwanted print statement and add update_template