Added parameters and combined private methods for shell use cases 3 and 4