Implementing initial solver routine