adding redundant size check