added rlimits and templating