handle nulls, still doesn't work though :(