basic buying functionality
added more function for buying functionality