Code refactor to add slo