Code for eece 281 project 2