tweaked constructor