added functionality for doing randomizations by day and computing null data