alg_hw08 with rws bug