Adapted code to get closer to given results