flag functionaliy added with email send to admin