compatibility with older scala versions