Assignment1 source codes