Used apply method for constructing case classes