remove unused len variable