more simplifications
renamed function