using metropolis

nothing new except for using metropolis (apparently not in a right way)
logic is in TO BE DELETED section in the end of the file