he had just staying within the castle walls.

Write the above sentence using proper case.
He had just staying within the castle walls.