added gaussian weights, plotting