refactored the entry page to make it less error prone.