added logic to transfer character to second level