tested and works in scalesApp