almost functional.
 alert to be tested.
add default function .