changed constructor parameter order for better backward compatibility