Added basic update logic