refactor out markers parts