a file for SPs; a little more class refactoring