version 1 with lots of bugs