fixes after feedback from aschempp