few bugs corrected