check for empty lists
switch to array functions from operators
type casting