implementation of paths