fixed #3
fixed #14

hopefully there isn't anyting embarissing in this :)