added in reference and binding stuff