Simplified function