Final code version