Import rest of code from netbeans
Import rest of code from netbeans