first working version with simple output
tried some known forms