dirty and buggy version with start of a cubic system class