Adding code from last playtest