Wrote fixed function simulating library