improve costF
before pull
html parse added
minor changes