mostly done

needs comments