Refactoring for easier use in the future