tried to do some things with Java constructor