maybe the saner way of doing it