adds margins; starts to clean data