removed inline and added str_chop
removed inline because of not working crosse file