Made random placement be able to take a maximum as well