more tidy code