fixed up opts passing and classes