Added bool occupied funtion