knock code works, implementing encryption