made attributes into member variables