updated API to be more concise