polling for svg loaded insted of using event