made adaptive alpha more efficient