restructure classes