ugly but a start to doing this right