Added drop_privs function