maybe works now, fixed a bug, so tired