deleted unused code (old plot method)