now working with netbeans minimal changes