finish my DRY code