modified a few things
added toS
added the main algorithm
added isSelected
added solution calculator
added all things