added -i functionality