added check for list existance in adjust list, otherwise causes a pretty nasty bug
fixed compare operator and added cplusplus guards