added a little extra code