Added a check for sufficient amount of data