Added S & P functionality