got an initial version working