tests passing

needs cleaning up