working on sim & delay