major update, Scratch functions