final implementation, test still fails