New 'sexting' law serves two purposes