Added Autobuy function.