Removed flag argument from newProperty and separated function into two