this is ugly, use if statement