added shell and dynamic memory (by JeGa)