changed api handler to one line liner