added touch support and changed api