Access variable from inside class