merge with Lec's latest version from Netbeans