script to get distributions