simplifed code even further