refactor to be a package instead of a binary