merge
added interface for real problems )
changed some docstrings