The first function fully implemented