updated to compile in scala 2.11