add guards for data