db update and these modifications by Aleksander Piotrowski <aleksander dot piotrowski at nic dot com dot pl>