fixing unitialized value problem