code cleanup & set method