it's legal to continue working while h1b extension is pending as long as it is filed before the previous status expires.