added functions to generate null distribution
wrapper for null distribution