added edit, delete, flag functionality