Corrected code as per coding convention