edited plot6 code, seriously done now