update js for rent/buy method