this fixes #2 and resolves #4 also resolved #6