updated entropy to have variable base