reduced some ugly code