Code for both Assignment Library