script related code extracted to another file