implemented everything but search