TweetFollow Us on Twitter

Registration Tool
Volume Number:12
Issue Number:12
Column Tag:Shareware Tools

Registration Tools

Tools for Providing Convenient Registration for Shareware

by James George, Los Alamos, NM

Note: Source code files accompanying article are located on MacTech CD-ROM or source code disks.

As we put the finishing touches on our shareware masterpieces, we realized that we had forgotten a vital link - a convenient registration method to encourage users to register and pay for the shareware. We looked around and found none, but MacTech saved the day with a timely article suggesting what was needed (Bill Midesitt - “How to Make $1,000 Per Week Stuffing (Virtual) Envelopes, July 1995). We’ve implemented many of the suggestions for the Metrowerks environment in Pascal or C.

We wanted an easy to include module which a) kept asking the user to register, b) provided an easy way for a user to register, c) allowed the author to create registration numbers, and d) allowed any user to un-register a registered copy to be distributed freely. Thus, Register includes the headers, functions, and resources providing the entire user interface and prints the registration form for mailing or faxing.

Include Register in your Metrowerks project by adding Register.c and Register.rsrc to your project , and inserting two lines in your setup/main module.

Listing 1: Typical Mac Template

Typical Mac Template

Include the Register headers, and check the registration.

#include “Register.h”

main()
{
 (*call usual Macintosh initialization setup routines *)
 
 CheckRegistration();
 
 (* do your event loop *)

}
 

The User Interface

As your application starts, CheckRegistration retrieves the registered name and registration number from the resources, recomputes the registration number from the name and compares it to the registration number from the resource. If these match, CheckRegistration returns and your application continues normally. When they do not match, a information dialog encourages the user to register.

Figure 1. The Information Dialog

Naturally, only the item numbers for the “Register” and “Not Yet” button are important, the rest of the dialog can be modified to promote your application.

If the user chooses “Not Yet”, the application continues normally; but, if “Register” is selected, than the registration dialog allows the information to be entered

Figure 2. The Registration Dialog

The user enters everything but the Registration Number, clicks “Print”, and sends the printed form and fee to YOU! If the user clicks “Cancel” no information is remembered; if the user click “OK”, everything is remembered except the credit card information.

When you receive the registration, you fire up your master copy, enter some special command and the MakeRegistration dialog allows you to enter the information, create a valid registration number from the users name (click on “Make Registration”), and print the information to return to the user.

Figure 3. The Make Registration Dialog

The Details

Now let’s look at the code in detail.

Listing 2: Register.h

Register.h
#define lockedAlert  400  /* application locked alert */
 
#define shareSplashAlert  401 /* the info screen */
 
#define registerDLog 314  /*the register dialog */
#define regPrintItem 3
#define regMkPwdItem 4
#define regFrstPrtItem    5
#define regLastPrtItem    19
#define regFrstOtherSaveItem12
#define regLastOtherSaveItem13
#define regNameItem11
#define regNumberItem19
 
#define regDataResType    ‘ABCD’
 
#define regNumSeedValue   1234/* seed value for test */
 
typedef long *longptr, **longhan;

 /* Prototypes */

void PrintRegForm(DialogPtr theDialog);
long ComputeRegistration(Str255 name);
void MakeRegistration(void);
void UnRegister(void);
void Register(void);
void CheckRegistration(void);

lockedAlert is the id for the alert which informs the user that the application is locked and thus no registration information can be remembered. The “OK” button must remain item 1.

shareSplashAlert is the id for the information alert which describes the features of the shareware and encourages the user to register. The item numbers for “Register” and “Not Yet” item numbers must remain unchanged, but the rest of the dialog may be modified.

registerDLog is the id for the registration (and make registration) dialog. The “OK” and “Cancel” item numbers must remain unchanged, but the rest can be moved as long as the appropriate defines are changed. regPrintItem is the “Print” button and regMkPwdItem is the “Make Registration” button. The items from regFrstPritItem thru regLastPrtItem are printed when the “Print” button is selected. The regNameItem, the regNumberItem and the items from regFrstOtherSaveItem thru regLastOtherSaveItem are saved in the resource file in the resource type regDataResType.

regNumSeedValue is used by the ComputeRegistration routine as the seeded initial value.

longptr and longhan are two data types used, and the prototypes are the actual routines.

Now, lets look at all of the routines which comprise the registration module; they are in Register.c

The registration number is calculated from the name by ComputeRegistration.

Listing 3: ComputeRegistration

ComputeRegistration
long ComputeRegistration(Str255 name)
{
 long   regnum;
 short  i;

 if (StrLength(name) == 0) regnum = -1; 
 else regnum = regNumSeedValue;
 for (i = 1; i<= StrLength(name); i++) 
 regnum = regnum + name[i];
 return (regnum);
}

This computes a registration number for a name, by starting with a seed value, and adding the character code for each character of the name, in order. Although not unique, this allows for many variations by shareware authors. Some of the variations are to change the seed, different arithmetic on individual characters (twice the value, three times the value, alternately add and subtract...). Even these simple techniques can be quite hard to break for the average user, but only a brain teaser for the dedicated hacker.

After an application has started and initializes the Macintosh required managers, it only needs to call CheckRegistration to implement most of the registration functionality; the enhancements will be discussed later.

Listing 4: CheckRegistration

CheckRegistration
// CheckRegistration verifies the remembered name and registration number and asks // the user to register 
the software if the verification fails.

void CheckRegistration(void)
{
 StringHandle  namehan;
 longhanregwdhan;
 long   inregwdnum, computeregwdnum;


 namehan = 
 (StringHandle) GetResource(regDataResType, regNameItem);
 regwdhan = 
 (longhan) GetResource(regDataResType, regNumberItem);
 if ( (namehan != nil) && (regwdhan != nil) )
 {
 if ( 
 (GetHandleSize((Handle) namehan) > 1) &&                      
 (GetHandleSize((Handle) regwdhan) == 4) )
 {
 HLock( (Handle) namehan);
 HLock( (Handle) regwdhan);
 computeregwdnum = ComputeRegistration(*namehan);
 inregwdnum = **regwdhan;
 HUnlock( (Handle) namehan);
 HUnlock( (Handle) regwdhan);
 if ( namehan != nil) ReleaseResource( (Handle) namehan);
 if ( regwdhan != nil) ReleaseResource( (Handle) regwdhan);
 regwdhan = nil;
 namehan = nil;
 if ( inregwdnum != computeregwdnum) Register();
 }
 } else 
 {
 if ( namehan != nil ) ReleaseResource( (Handle) namehan);
 if ( regwdhan != nil ) ReleaseResource( (Handle) regwdhan);
 Register();
 }
}

CheckRegistration gets the remembered name and registration number from the regDataResType resource. If either is not there, then Register is called, otherwise a registration number is calculated from the remembered name and compared to the remembered registration number, and if they differ, then Register is called.

Listing 5: Register

Register
void Register(void)
{
 DialogPtrtheDialog;
 Handle theTextHdl;
 Rect itemBox;
 short  itemHit, theType, index;
 GrafPtrthePort;
 Str255 namestr, regstr;
 long regwordL;
 StringHandle  nameHan, strHan;
 longhanregsHan;


 FlushEvents (everyEvent, 0); /*throws out leftover events */
 if ( Alert(shareSplashAlert, nil) == OK )
 {
   FlushEvents (everyEvent, 0);
 theDialog = 
 GetNewDialog (registerDLog, nil, (WindowPtr) -1);
  if (theDialog != nil)
  {
   /*Hide the Make Reg Number button*/
   HideDialogItem(theDialog,regMkPwdItem);

   /*fill in text fields from save values*/
 strHan = 
 (StringHandle) GetResource(regDataResType, regNameItem);
 if ( strHan != nil) 
 {
 GetDialogItem (theDialog, regNameItem, &theType,              
 &theTextHdl, &itemBox);
   SetDialogItemText (theTextHdl, *strHan);
   ReleaseResource((Handle) strHan);
   }

 for ( index = regFrstOtherSaveItem; 
 index <= regLastOtherSaveItem; index ++)
 {
 strHan = (StringHandle) GetResource(regDataResType, index);
 if (strHan != nil)
 {
 GetDialogItem (theDialog, index, &theType, 
 &theTextHdl, &itemBox);
   SetDialogItemText (theTextHdl, *strHan);
   ReleaseResource((Handle) strHan);
  }
  }
   

  GetPort(&thePort);
 SetPort (theDialog);
  ShowWindow (theDialog); 
  do
  {
   ModalDialog (nil, &itemHit); 
   if ( itemHit == regPrintItem ) PrintRegForm(theDialog);     
  }while (itemHit > cancel);
   
  if ( (itemHit == ok) || (itemHit == regPrintItem) )
   {
   GetDialogItem (theDialog, regNameItem, &theType,            
 &theTextHdl, &itemBox);
   GetDialogItemText (theTextHdl, namestr);
   GetDialogItem (theDialog, regNumberItem, &theType,          
 &theTextHdl, &itemBox);
   GetDialogItemText (theTextHdl,regstr);
   StringToNum(regstr, &regwordL);
   if ( Length(namestr) > 0)
   {
 UnRegister();
 regsHan = (longhan) NewHandle(4);
   nameHan = NewString(namestr);
   **regsHan = regwordL;
   AddResource( (Handle) nameHan, regDataResType,              
 regNameItem , “\p”);
 if ( ResError() != noErr) 
 { itemHit = StopAlert(lockedAlert,nil);}
 WriteResource( (Handle) nameHan);
   AddResource( (Handle) regsHan,regDataResType,               
 regNumberItem , “\p”);
 if ( ResError() != noErr) 
 { itemHit = StopAlert(lockedAlert,nil); }
 WriteResource( (Handle) regsHan);
 UpdateResFile(CurResFile());
 for ( index = regFrstOtherSaveItem; 
 index <= regLastOtherSaveItem; index++)
 {
   GetDialogItem (theDialog, index, &theType,                  
 &theTextHdl, &itemBox);
   GetDialogItemText (theTextHdl,namestr);
   nameHan = NewString(namestr);
   AddResource( (Handle) nameHan,regDataResType, 
 index , “\p”);
 if ( ResError() != noErr) 
 { itemHit = StopAlert(lockedAlert,nil); }
 WriteResource( (Handle) nameHan);
 UpdateResFile(CurResFile());
 }
 }
   }    /*of ok || regPrintItem] */
   
  DisposeDialog(theDialog);
  SetPort(thePort);
 SetCursor(&qd.arrow);
   }
 }
}

Register puts up the information dialog (the shareSplashAlert), and if the user selects the “Register” button, it puts up the registration dialog, prints whenever the “Print” button is clicked, and exits when “OK” or “Cancel” is clicked. When “OK” is clicked, various entered data is remembered; the name, registration number, and fields from regFrstOtherSaveItem thru regLastOtherSaveItem. Register does not verify the registration number, but just remembers the data for the next invocation of the application.

To print the registration form, PrintRegForm is called.

Listing 6: PrintRegForm

PrintRegForm

void PrintRegForm(DialogPtr theDialog)
{ 
 short  index, which, xpos, ypos, theType;
 Handle theTextHdl;
 Rect   itemBox;
 GrafPtr  thePort;
 Str255 thestr, pbuf;
 TPPrPort PPort;
 THPrint  prh;
 Boolean  tmpb;
 TPrStatusstatus;
 Point  pos;
 
 if (regFrstPrtItem <= regLastPrtItem) /* ?something to print*/
 {
  GetPort(&thePort);
 prh = (THPrint) NewHandle(sizeof(TPrint));
 PrOpen();
 PrintDefault(prh);
 tmpb = PrValidate(prh);
 tmpb = PrStlDialog(prh);
 if (PrJobDialog(prh))
 {
 PPort = PrOpenDoc(prh,nil,nil);
 TextFont(times);
 TextSize(12);
 if (PrError() == noErr) PrOpenPage(PPort,nil);
  
  for ( index = regFrstPrtItem; 
 index <= regLastPrtItem; index++)
  {
  GetDialogItem (theDialog, index, &theType, 
 &theTextHdl, &itemBox);
  GetDialogItemText (theTextHdl, thestr);
  if ( StrLength(thestr) > 0)
  {
   xpos = itemBox.left;
   ypos = itemBox.top + 12;
   MoveTo(xpos,ypos);
   for ( which = 1; which <= StrLength(thestr); which++)
   {
   if ( thestr[which] < ‘ ‘)
   {
   ypos= ypos +12;
   MoveTo(xpos,ypos);
   } else DrawChar(thestr[which]);
   if ( thestr[which] == ‘ ‘)
   {
   GetPen(&pos);
   if ( pos.h >= itemBox.right)
   {  
   ypos= ypos +12;
   MoveTo(xpos,ypos);
   }
   }
   }
  }
  }
  if (PrError() == noErr)
  {
   PrClosePage(PPort);
 PrCloseDoc(PPort);
 if ( (**prh).prJob.bJDocLoop == bSpoolLoop)
 PrPicFile(prh,nil,nil,nil, &status);
 }
 PrClose();
 DisposeHandle((Handle) prh);
 SetPort(thePort);
 }
 } 
}

A routine to compute the registration number from the name is provided and uses the same dialog as the registration dialog, with an additional button “Make Registration.” Actually, the button is always present, but hidden by the Registration module. The user sends a printout from the Registration or sends the data electronically, you reenter the data, click “Make Registration,” click “Print” and return a copy with the registration number.

MakeRegistration is called via a pull down menu in the test program but in our actual products, it is called via special hidden commands, since we wanted only one product to maintain and required the ability to make a registration number from any copy of the product. Some possibilities are to install the make menu items as the result of selecting a standard pull down menu with various modifier keys depressed. A very complex mechanism can be constructed, which is easy to execute by the author but difficult to discover.

Listing 7: MakeRegistration

MakeRegistration

void MakeRegistration(void)
{
 DialogPtrtheDialog;
 Handle theTextHdl;
 Rect   itemBox;
 short  itemHit, theType;
 GrafPtrthePort;
 Str255 tmpstr;
 long   regwordL;


 FlushEvents (everyEvent, 0); /*throws out clicks, keys*/
 theDialog = GetNewDialog (registerDLog, nil, (WindowPtr) -1);
 if (theDialog != nil)
 { /*Shows the Make Password button*/
 ShowDialogItem(theDialog,regMkPwdItem);                       
 GetPort(&thePort);
 SetPort (theDialog);
 ShowWindow (theDialog);
 do
 {
 ModalDialog (nil, &itemHit); 
 if (itemHit == regMkPwdItem) /* make register # */
 {
 GetDialogItem (theDialog, regNameItem, &theType, 
 &theTextHdl, &itemBox);
 GetDialogItemText (theTextHdl,tmpstr);
 regwordL = ComputeRegistration(tmpstr);
 NumToString(regwordL,tmpstr);
 GetDialogItem (theDialog, regNumberItem, &theType,            
 &theTextHdl, &itemBox);
 SetDialogItemText (theTextHdl,tmpstr);
  } else 
 if (itemHit == regPrintItem)PrintRegForm(theDialog);
 }while (itemHit > cancel);
   
 DisposeDialog(theDialog);
 SetPort(thePort);
 SetCursor(&qd.arrow);
 }
}


It is advantageous for every shareware user to become an advocate of the product and distribute it widely, but only the unregistered version should be distributed. Thus, an unregistering module is provided and the user is encouraged to distribute the unregistered version to friends, bulletin boards, etc.

Every Macintosh application has an About... module, and we’ve added an unregister button to the About alert, as well as a place for the registered owners name.

Figure 4. The About... Alert

The changes in the About.. module are to retrieve the name from the resource file and display it. If “Unregister” is clicked on, then the unregister module is executed.

Listing 8: AboutApplication

AboutApplication

void AboutApplication(void)
{
 short tmpInt;
 StringHandle  regnameHan;

 regnameHan = (StringHandle)  GetResource(regDataResType,regNameItem);
 if ( regnameHan != nil)
 {
 HLock( (Handle) regnameHan);
 ParamText( *regnameHan, “\p”, “\p”, “\p”);
 HUnlock( (Handle) regnameHan);
 ReleaseResource( (Handle) regnameHan);
 } else ParamText( “\p”, “\p”, “\p”, “\p”);

 tmpInt = Alert(applicationAboutId, nil);
 if ( tmpInt == aboutUnregisterItem) UnRegister();
}

The UnRegister module deletes all of the user data; name, address... from the resources. This results in a version which reverts and asks for the shareware to be registered.

Listing 9: UnRegister

UnRegister
void UnRegister(void)
{
 Handle tmpHan;
 short  index;
 do
 {
 tmpHan = GetResource(regDataResType, regNameItem);
 if (tmpHan != nil)
 { 
 RemoveResource(tmpHan);
 DisposeHandle(tmpHan);
 UpdateResFile(CurResFile());
 }
 } while (tmpHan != nil);
 
 do
 {
 tmpHan = GetResource(regDataResType, regNumberItem);
 if (tmpHan != nil)
 { 
 RemoveResource(tmpHan);
 DisposeHandle(tmpHan);
 UpdateResFile(CurResFile());
 }
 } while (tmpHan != nil);

 for (index = regFrstOtherSaveItem; 
 index <= regLastOtherSaveItem; index++)
 do
 { 
 tmpHan = GetResource(regDataResType, index);
 if (tmpHan != nil)
 { 
 RemoveResource(tmpHan);
 DisposeHandle(tmpHan);
 UpdateResFile(CurResFile());
 }
 } while (tmpHan != nil);
}

Summary

Registration Tools provide a convenient package for generating a registration number based upon a name, gently encouraging the registration of the shareware, providing printed forms for ease of registration, and supporting the broad distribution of unregistered copies. These tools were written with the philosophy that shareware users will register for modest fees if the software performs desired functions, and they are tactfully reminded; we believe that the best way of evaluating shareware is to provide fully functioning software, with documentation.

Registration Tools does not provide copy protection, in fact the user is encouraged to UnRegister and distribute copies! In our examples, the registration is checked only at the beginning and the tests were built with symbol tables enabled; thus, it can be hacked quite easily with a debugger/disassembler. There are many improvements and variations to make “hacking” more difficult but most of us would prefer to get on with creating great shareware for the Macintosh!

We appreciate the excellent review by a MacTech reviewer, and the following is a quote from that review.

So that there is no misunderstanding, it should be made clear that neither the reviewer nor the magazine condone hacking as a way of avoiding payment to authors of commercial or shareware software. The point of this response is to point out to shareware authors the ease with which registration schemes can be bypassed, so that they are under no illusion about the security provided by these schemes. The Registration Tools approach is an effective way to remind users that a shareware fee needs to be paid, while allowing them the opportunity to try out all of the features of the software before deciding whether to purchase it, but it is not a copy protection scheme.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Four apps to help improve your Super Bow...
Super Bowl Sunday is upon us, and whether you’re a Panthers or a Broncos fan you’re no doubt gearing up for it. [Read more] | Read more »
LooperSonic (Music)
LooperSonic 1.0 Device: iOS Universal Category: Music Price: $4.99, Version: 1.0 (iTunes) Description: LooperSonic is a multi-track audio looper and recorder that will take your loops to the next level. Use it like a loop pedal to... | Read more »
Space Grunts guide - How to survive
Space Grunts is a fast-paced roguelike from popular iOS developer, Orange Pixel. While it taps into many of the typical roguelike sensibilities, you might still find yourself caught out by a few things. We delved further to find you some helpful... | Read more »
Dreii guide - How to play well with othe...
Dreii is a rather stylish and wonderful puzzle game that’s reminiscent of cooperative games like Journey. If that sounds immensely appealing, then you should immediately get cracking and give it a whirl. We can offer you some tips and tricks on... | Read more »
Kill the Plumber World guide - How to ou...
You already know how to hop around like Mario, but do you know how to defeat him? Those are your marching orders in Kill the Plumber, and it's not always as easy as it looks. Here are some tips to get you started. This is not a seasoned platform... | Read more »
Planar Conquest (Games)
Planar Conquest 1.0 Device: iOS Universal Category: Games Price: $12.99, Version: 1.0 (iTunes) Description: IMPORTANT: Planar Conquest is compatible only with iPad 3 & newer devices, iPhone 5 & newer. It’s NOT compatible with... | Read more »
We talk to Cheetah Mobile about its plan...
Piano Tiles 2 is a fast-paced rhythm action high score chaser out now on iOS and Android. You have to tap a series of black tiles that appear on the screen in time to the music, being careful not to accidentally hit anywhere else. Do that and it's... | Read more »
Ultimate Briefcase guide - How to dodge...
Ultimate Briefcase is a simple but tricky game that’s highly dependent on how fast you can react. We can still offer you a few tips and tricks on how to survive though. Guess what? That’s exactly what we’re going to do now. Take it easy [Read more... | Read more »
SoundPrism Link Edition (Music)
SoundPrism Link Edition 1.0 Device: iOS Universal Category: Music Price: $4.99, Version: 1.0 (iTunes) Description: ***Introductory price for a the first few days after launch - if you're reading this, get it while it's fresh out of... | Read more »
Pre-register now for hack and slasher An...
Fincon, which won Facebook's Studio to Watch award in 2015, has announced that pre-registration is now open for the massive 3.0 update for its award-winning hack and slasher Angel Stone. Angel Stone is a post-apocalyptic action RPG in which the... | Read more »

Price Scanner via MacPrices.net

iPads on sale at Target: $100 off iPad Air 2,...
Target has WiFi iPad Air 2s and iPad mini 4s on sale for up to $100 off MSRP on their online store for a limited time. Choose free shipping or free local store pickup (if available). Sale prices for... Read more
Target offers Apple Watch for $100 off MSRP
Target has Apple Watches on sale for $100 for a limited time. Choose free shipping or free local store pickup (if available). Sale prices for online orders only, in-store prices may vary: - Apple... Read more
Apple refurbished 2014 13-inch Retina MacBook...
Apple has Certified Refurbished 2014 13″ Retina MacBook Pros available for up to $400 off original MSRP, starting at $979. An Apple one-year warranty is included with each model, and shipping is free... Read more
Macs available for up to $300 off MSRP, $20 o...
Purchase a new Mac or iPad using Apple’s Education Store and take up to $300 off MSRP. All teachers, students, and staff of any educational institution qualify for the discount. Shipping is free, and... Read more
Watch Super Bowl 50 Live On Your iPad For Fre...
Watch Super Bowl 50 LIVE on the CBS Sports app for iPad and Apple TV. Get the app and then tune in Sunday, February 7, 2016 at 6:30 PM ET to catch every moment of the big game. The CBS Sports app is... Read more
Two-thirds Of All Smart Watches Shipped In 20...
Apple dominated the smart watch market in 2015, accounting for over 12 million units and two-thirds of all shipments according to Canalys market research analysts’ estimates. Samsung returned to... Read more
12-inch 1.2GHz Retina MacBooks on sale for up...
B&H Photo has 12″ 1.2GHz Retina MacBooks on sale for $180 off MSRP. Shipping is free, and B&H charges NY tax only: - 12″ 1.2GHz Gray Retina MacBook: $1499 $100 off MSRP - 12″ 1.2GHz Silver... Read more
12-inch 1.1GHz Gray Retina MacBook on sale fo...
B&H Photo has the 12″ 1.1GHz Gray Retina MacBook on sale for $1199 including free shipping plus NY sales tax only. Their price is $100 off MSRP, and it’s the lowest price available for this model... Read more
Apple now offering full line of Certified Ref...
Apple now has a full line of Certified Refurbished 2015 21″ & 27″ iMacs available for up to $350 off MSRP. Apple’s one-year warranty is standard, and shipping is free. The following models are... Read more
Free GUI Speedometer – The Ultimate Digital D...
Miami, Florida based RMKapps has announced the official release of GUI Speedometer 1.0, their digital dashboard display developed for iOS devices. GUI Speedometer allows users to track their precise... Read more

Jobs Board

*Apple* Subject Matter Expert - Experis (Uni...
This position is for an Apple Subject Matter Expert to assist in developing the architecture, support and services for integration of Apple devices into the domain. Read more
*Apple* Macintosh OSX - Net2Source Inc. (Uni...
…: * Work Authorization : * Contact Number(Best time to reach you) : Skills : Apple Macintosh OSX Location : New York, New York. Duartion : 6+ Months The associate would Read more
Computer Operations Technician ll - *Apple*...
# Web Announcement** Apple Technical Liaison**The George Mason University, Information Technology Services (ITS), Technology Support Services, Desktop Support Read more
Restaurant Manager - Apple Gilroy Inc./Apple...
…in every aspect of daily operation. WHY YOU'LL LIKE IT: You'll be the Big Apple . You'll solve problems. You'll get to show your ability to handle the stress and Read more
Simply Mac *Apple* Specialist- Service Repa...
Simply Mac is the largest premier retailer of Apple products in the nation. In order to support our growing customer base, we are currently looking for a driven Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.