moved flags to createMailbox