basic input and output base validation added