First function

Not finished