Added methods to reduce code duplication