got the final code down