added count and extended mapping