fixed definition errors and redifined certain fields