Add schemas code

Is this a bug? Should it be `parrent(ss)`? Also can we avoid the name shadowing.