simplified and fixed references