the code is running as expected though