modified functions that interact with store to accept parameter rather than global