copied files from liquid/pull/336