#1618 | Vinay, Hemanth | minor refactoring - moved out to methods