not used errors fixed