Implement final path calculation

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>