minor modification on __construct method