add math wrapper for abs call
add legends to core source files