add create ad functionality and mongodb stuff