init check in code