Continue working on sim, put sim function into separate file