Added helper functions to set attributes