adding most of working code - basically: initial working commit
accidentally added tmp & cache