removed unused functions and made operator? slightly more abstracted