nbh merge
pleas no problems
nbH added shorten function and vim stuff