maybe not totally perfect but a kind of solution that can be considered