added handling of results