adding API for Scratch