fix warnings and errors by defining my struct properly