Better implementation for 4