refactor for more concise interface