Added implementation for randomly generating objects and resetting their position