let's modernize the code