fixes #7 #3 #2 #1