testing optional attributes when creating