Added @FunctionalInterface annotation to functions