fixed #1 and refined a bunch of stuff