completely replaced the code with something simpler