code duplication doesn't fit github