improve the formating and change it to a smart_inject script