some improvement-tips from Johan L in comments