first mod function implementation

Signed-off-by: Beni Lev <beniloew@gmail.com>