Refactored 3373 Code