minor updates to optimize constants + its testing