new approach

not elegant, hopefully works