mapped out area algortithm a bit