Restored working version