working Version  with some unimplemented funtionality