fix implementation of previous commit