worked a bit on it, check my work.