not sure why I made this so complex