tweaked sim function
added anastrophe function