First implementation of a main