first working version with replies