added navigator vibrate variable declaration
added more function comments