fully working version, need cleanup and some css