initial work on refs