updated comments and added inject method