styles wasting my life
reindented
added listener for scope change