Implement alpha beta