adjusting all classes to work on double coordiantes