fix alpha calculation, modify alpha indexing