fixed FS#7
implemented FS#8