simulation works ok