added determing alpha