Removed extra shift register. Fixed argument counting