back end complete

we have some bugs , see Issues