fixes for lab 4 SMOD