added constructor to avoid state weirdness