cleaned up and fixed references