added the first few checks for creating a node