#43 - Abstract Logic into an actual function

Pull Request Auto-Created by Zhenbot™