added buying functionality