updated minor errors - store 3, global vars