AC-52 Improve code