api3 rewritten properly