Changed to work with renamed functions