adding tests after memory optimization