accepting hash in attribute method