code for SLAE32 assignment #2