added comments and fixed do_and_form