revised api, support custom options