some changes and added lifetime consideration on access