address most issues pointed out by Piotr Ożarowski