reorganize not to do everything in constructor