finally got chapter and user ids recorded to database!