Assignment1A code