Problem specific implementation