added plotting method