change param
added header message
max inputs logic