Code for CECS 274