Functions are realized

Both functions are ready.