refactord admin part for best performance