Implemented ss_alloc() for hw6