added constructor checks