use temp script instead of function