added callbacks
refactored callbacks
removed double i declaration
removed double i declaration
Merge pull request #51 from CalvinFernandez/master

modified callback functions