move admin logic to package admin