fixes #14 #2 #1