Updated to take wirless device as a parameter