second SML assignment