lots of bugs corrected and versions