using templates to avoid copied code <3