working. matrix tweaking needed