using "cl-flet" instead of "flet" which is deprecated in emacs 24.3