testing pat solution
worked 5 minutes on it and got a first real prototype working, very hacky code