Added CreateInstance method