major update; working prototype