* optimize alpha calculations
* code cleanup