(has failing tests) prototyping rewrite