Adding 'having' implementatin for models