Improved the implementation and readuibilty if establish_baseline