simplified the script for the preparation of count data