attempt at refactor for more efficient init