first demoversion with pic
add counter but leak
fixed