fixed usage of a and alpha in new funciton