SN-36 Improve code