change few lines
optimize