Some changes for better runtime