simulation works perfectly