move dijstra class to header