Added inverse of toAlpha function