added scales and more functions