Improve the grammar in the given text:
As they were looking for it in the garden they realised the console was near a tree.
As they were looking for it in the garden, they saw the console was near a tree.