removed lambdas, making it compatible with Java6