made neat and no lookup optimization