add missing primitives, add check.sh script