fixed random seed for reproducibility, added test, refactored
added gitignore