working versionof charts