added function declarations to edit_instance.inc. not finished