lab4 sanghoun's fixes