refactor addEntry

Signed-off-by: Jeff Wells <jeff@jeffrwells.com>