wrote function 1

@ayhad