added input functionality