make modifications suggested by Dominik