added error checking for placement