minor refactoring for updating area
correct refactoring to make sure it still works
added select and set commands