updated PS3-1.s based on debugging