move #inject_placeholders to a better place