tested the code and it worked