work in progress but works :))