added chart factory for future niceness