some validation
Merging with Karols changes
Draft for validation