not final yet

still the code needs to be organized and commented