oops needed better type checking