edge case - make sure there is an element in the array before derefrencing it :)