a simplified solution