almost complete

with bugs to fix