3.0 fixed to work inside and outside of class