tweeking and error fixes