mod: refactory source code
mod: performance for Attribute check