removed dependency on R-3.0 and fixed a compatibility bug in initializing plot