everything 'works' but there are obviously some optimizations to be made