ok working version of Hlmk sim