Replaced the action with a java 8 lamnbda.