put scriptlet in the right place