removed many compile time warnings