Abstract the functions