prep for complete refactor to scala