SN-28 Refactore code