removed unnecessary length check when printing