completed most functionaility