added index to attempt table
added indexes to database for faster query