1st mostly working version, kinda...