improve collection api