Removed duplication by moving one function to admin_helper