basic layout of init function