many errors now left after refectoring