more tuning and bullet proofiing, still wip