added first implementation of buy