Refactor for easier use

Refactor for easier use