works now, some fixes