added alert and called anonimous function