remove function name after attribute
use map for maping instead of foreach
concatenate methods