closes #240 refactor core moved functions to better helpers