added delay and made email form functional