reorganised and added lisp version