updated doku and fixed bug for reading terminal options