added -s functionality