changed api to match js more