class creation and recoding to standard approach