updated to inline version