Removed db like iframe
Var declerations should be inside function