fix bugs
plot graphs