added step5 and step6