Alphabeta function works