added compatibility up to 3.6