java class + javascript finished