done but have  some minor bugs to fix