integrated api call into index and submit pages