starting to refactor, now using two files