Yeah I don't feel like coding this. So just go
here
to read Interlock :)