changes for adding nonnull and giving default values