trimmed some unused code