add common header
change data members to shared pointer