small update, fixed typo, added algo