added weighted line function
added example