Initial version of class 5 code