created variable for reused code