ugly but works

there has to be a prettier way, but this works well