modified mk script.