updated code for compilation error