udpated main