Initial code for simulator