added const knode& return values where appropiate