finished product (for now), some bugs to work out