remove sync loading, do all operations after document load