some exception throwing parts commented out