refactor code and switch to parallels