Started adding function code 1