added algorithms 20140527