more elegant solution, yes I like it