Removed while loop so sample entries are just done once