get occupancy function working and added to command line interface