Main background and algorithm discussion added to the paper