cleaning the code; added better container data addition implementation