refactored with SHS