some modifications and a ui implemented