ver 3 exact same as ver1 should take input now!!!!!!!!!!!!