updated .cpp methods