added scale method
added preprocessing