Initial assignment3 code