made compatible with scala 2.11.2