updated shell containing code for all required and B functionality