basic rental function working