Magnetic and electronic state of Co in LaCoO3