Added cpu version with validation