separated CV stuff into functions