scms - code refactored