terrible hacky code