First implementation of passgen