add number of units to place and the code is more structured