set endKey field in constructor