Assignment1 base implementation