the compiler does all the above automatically