added loging class; bug fixes; logging progress