condense this into one class