Added priority functionality