code for term project