Added private methods which throw exceptions for invalid arguments