refactored monkey patch methods to single method in array and added test