const correctness
added general convert factory method