can now plot more than one date. code cleanup