WIP: better check inputs