fixed __construct method