try to write a mini working version on linux