Skeleton code for the different states