various optimization attempts