Updated for all three cases