Tweaking code slightly