final version code it's work