param an attr are very similar, maybe theres a way to simplify