using motion api