started working on the java mplemtaion of the site swap function