fixing and adding delay so you can see graph