truncation checks and stuff