re-order and privatize functions
add candidate type in annotations