Modifying client.erl for the new specification