improve api slightly