Might make scala version smarter...