fix magnitude, add tests and gitignore file, bumped version