Base code for assignments