switched from java to js/html