buggy code but sorta there