basic function implementation
declaration + compilation + test corrections