runs, but has bugs