added flags and change ty to reply