returning necessary attributes to variables