prototype

very beginning version, need further work.