finished basic implementation of input