added inject method and formatting