added line and dir functionality