alphabeta function

gets stuck