fixed issues with code
fixed minor bug
added explanation to paper for you