adding messages as shared ptr and creating location as __MSG_LOCATION__