a lot of not neccessary stuff deleted. It has now moved to
OccupancyAnalyzer package to make this one look clearer and do only one
thing at a time